


This subdirectory contains to subsubdirectories for the single item and scale Bayesian analyses.  Each subsubdirectory contains:

1. iREDS setup.R that calls ireds_dataset_wide_v12.dta and preprocesses the data and initial values to read into OpenBUGS.
2. iREDSmodel.txt is the model and iREDSscript.txt initializes the nodes to monitor.  
3. The setup file creates a data and inits files.
4. After the model converges, I create the following text files: state files that are the final samples, stats is the descriptives for the structural parameters, coda files to read back into R.
5.  I also create the following ODC files: bgrdiag which is the BGR convergence diagnostic, history is the traceplots for the structural parameters and density are the density plots of the posterior marginals.
6. Note that the scale subdirectory contains subsubdirectories that correspond to each scale.  The R file iREDS_scale_figures creates the ridge plot in the main text (and the violin plot for the rho parameters in the SM).  The R file iREDS_scale_figures_wcov creates the ridge plots for the subgroup analysis we report in the SM.
7.  Each scale subdirectory has two subsubdirectories, one for the subgroup analysis we report in the SM, and one for the WAIC analysis we report in the SM that compares the full model that nests respondents in labs using a CAR prior, to the restricted model that assumes respondents are independent.





